﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace PrintApp
{
    public class Message
    {
        [JsonProperty(PropertyName = "jsonrpc")]
        public string JSONRPC { get; set; }
        [JsonProperty(PropertyName = "method")]
        public string Method { get; set; }
        [JsonProperty(PropertyName = "params")]
        public object[] Params { get; set; }

        public Message(string domain, string fileName)
        {
            JSONRPC = "2.0";
            Method = "put";
            Params = new object[] { domain, new { user = "user", file = fileName } };
        }
    }
}
